<#include "overall_header.html">

						<form id="form_1" action="${se_page.post_action}" method="get">
							<fieldset class="display-options">
								<div class="options-group">
									${L("user")}: 
									<select id="user_id" name="user_id">
										${se_page.maintainer_options}
									</select>
									${L("log.object-type")}: 
									<select id="objectType" name="objectType">
										${se_page.type_options}
									</select>
									${L("log.object-id")}:
									<input type="text" value="<#if se_page.bean.objectId&gt;0>${se_page.bean.objectId}</#if>" size="15" maxlength="64" id="obj_id" name="obj_id">
								</div>
								<div class="options-group">
									${L("log.create-time")}: 
									<input type="text" value="<#if se_page.bean.createAfter??>${se_page.bean.createAfter?string('yyyy-MM-dd')}</#if>" size="15" maxlength="64" id="create_after" name="create_after"> - 
									<input type="text" value="<#if se_page.bean.createBefore??>${se_page.bean.createBefore?string('yyyy-MM-dd')}</#if>" size="15" maxlength="64" id="create_before" name="create_before"> 
									${L("log.action")}: 
									<input type="text" value="${se_page.bean.action}" size="15" maxlength="64" id="action" name="action">
									${L("log.orderby")}: 
									<select id="orderby" name="orderby">
										${se_page.orderby_options}
									</select>
									<input type="hidden" name="form_submit" value="1"/>
									<input type="submit" value="${L("global.search")}" name="filter" class="button2">
								</div>
							</fieldset>
							<script type="text/javascript">
								$('#create_after').datepicker({ dateFormat: 'yy-mm-dd' });
								$('#create_before').datepicker({ dateFormat: 'yy-mm-dd' });
							</script>
						</form>

						<div class="clearfix">&nbsp;</div>

						<table cellspacing="1">
							<thead>
								<tr>
									<th width="150">${L("log.time")}</th>
									<th width="60">${L("log.object-type")}</th>
									<th width="150">${L("log.object-name")}</th>
									<th width="140">${L("log.action")}</th>
									<th>${L("log.parameters")}</th>
									<th width="120" style="text-align: center;">${L("log.user-name")}</th>
								</tr>
							</thead>
							<tbody>
								<#if se_page.operationlogs??>
								<#list se_page.operationlogs as operationlog> 
								<tr class="row<#if (operationlog_index % 2) == 0>1<#else>2</#if>">
									<td>${operationlog.time?string("yyyy-MM-dd HH:mm")}</td>
									<td><a href="${sf_configs.root_path}/acp/operationlog${sf_configs.extension}?obj_type=${operationlog.objectType}">${L("log.type."+operationlog.objectType)}</a></td>
									<td>
										<#if operationlog.object??>
										<a href="${sf_configs.root_path}/acp/operationlog${sf_configs.extension}?obj_type=${operationlog.objectType}&obj_id=${operationlog.objectId}" title="${operationlog.object.objectName}">
											<#if operationlog.object.objectName?length &gt; 40>${operationlog.object.objectName?substring(0, 40)}...<#else>${operationlog.object.objectName}</#if>
										</a>
										<#else>
										${operationlog.objectId}
										</#if>
									</td>
									<td><#if L("nav."+operationlog.action)??>${L("nav."+operationlog.action)}<#else>${log.action}</#if></td>
									<td>

										<#if operationlog.parametersMap??>
										<table cellspacing="1">
											<#list operationlog.parametersMap?keys as paramKey>
											<tr class="row<#if (paramKey_index % 2) == 0>1<#else>2</#if>">
												<td><b>${paramKey}</b></td><td>
												<#assign lv1value = operationlog.parametersMap[paramKey]>
												<#if lv1value?is_collection>
													<ul><#list lv1value?keys as paramKey2><li>${lv1value[paramKey2]}</li></#list></ul>
												<#elseif lv1value?is_sequence>
													<ul><#list lv1value as lv2value><li>${lv2value}</li></#list></ul>
												<#else>
												${lv1value}
												</#if>
											</td></tr>
											</#list>
										</table>
										</#if>

									</td>
									<td><a href="${sf_configs.root_path}/acp/operationlog?user_id=${operationlog.userId}">${operationlog.user.name}</a></td>
								</tr>
								</#list></#if> 
							</tbody>
						</table>

						<div style="float: right; margin: 15px 0pt 2px;" class="pagination">
							<strong>${se_page.bean.start}</strong> / <strong>${se_page.bean.size}</strong>
							${se_page.page_nav}
						</div>

<#include "overall_footer.html">

